import { createRouter, createWebHistory } from 'vue-router'

// 导入路由组件
const routes = [
  {
    path: '/',
    redirect: '/product-management'
  },
  {
    path: '/product-management',
    name: 'ProductManagement',
    component: () => import('../views/ProductManagement.vue'),
    meta: {
      title: '商品管理',
      icon: '📦'
    }
  },
  {
    path: '/product-crawler',
    name: 'ProductCrawler',
    component: () => import('../views/ProductCrawler.vue'),
    meta: {
      title: '商品信息爬取',
      icon: '🕷️'
    }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router